import request from '@/utils/request';

export async function productlist(params?: any) {
  return request('/api/product/productformlist/', {
    method: 'GET',
    params,
  });
}
export async function svnformlist(params?: any) {
  return request('/api/publish/svnformlist/', {
    method: 'GET',
    params,
  });
}

export async function publishlist(params?: any) {
  return request('/api/publish/list/', {
    method: 'GET',
    params,
  });
}

export async function publishCreate(params: any) {
  return request('/api/publish/create/', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}

export async function publish_detial_list(params?: any) {
  return request('/api/publish/publish_detial_list/', {
    method: 'GET',
    params,
  });
}

export async function tool_list(params?: any) {
  return request('/api/publish/tool_list/', {
    method: 'GET',
    params,
  });
}
export async function version_list(params?: any) {
  return request('/api/publish/version_list/', {
    method: 'GET',
    params,
  });
}
export async function version_down(params?: any) {
  return request('/api/publish/version_down/', {
    method: 'GET',
    headers:{"Content-Type": "application/json",},
    responseType:"blob",
    params,
  });
}

export async function version_remove(params?: any) {
  return request('/api/publish/version_remove/', {
    method: 'GET',
    params,
  });
}

export async function version_search(params?: any) {
  return request('/api/publish/version_search/', {
    method: 'GET',
    params,
  });
}

export async function email_list(params?: any) {
  return request('/api/publish/email_list/', {
    method: 'GET',
    params,
  });
}
export async function email_create(params?: any) {
  return request('/api/publish/email_create/', {
    method: 'POST',
    params,
  });
}
export async function email_update(params?: any) {
  return request('/api/publish/email_update/', {
    method: 'POST',
    params,
  });
}